Bulugh al-Maram, Book 10, Hadith 1291 (English)

Wa'il Al-Hadrami narrated that Tariq bin Suwaid asked the Messenger of Allah about Khamr which he made only to be used as a medicine. The Prophet replied, "It is not a medicine, it is a disease." Related by Muslim and Abu Dawud.

وَعَنْ وَائِلٍ اَلْحَضْرَمِيِّ; أَنَّ طَارِقَ بْنَ سُوَيْدٍ رَضِيَ اَللَّهُ عَنْهُمَا { سَأَلَ اَلنَّبِيَّ ‏- صلى الله عليه وسلم ‏-عَنْ اَلْخَمْرِ يَصْنَعُهَا لِلدَّوَاءِ? فَقَالَ: " إِنَّهَا لَيْسَتْ بِدَوَاءٍ, وَلَكِنَّهَا دَاءٌ" } أَخْرَجَهُ مُسْلِمٌ.‏ وَأَبُو دَاوُدَ وَغَيْرُهُمَ ا (1630)‏.‏ ‏1 ‏- صحيح.‏ رواه مسلم ( 1984 )‏، وأبو داود ( 3873 )‏ واللفظ لمسلم؛ إلا أنه عنده عنه بتذكير الضمير" إنه.‏.‏.‏.‏.‏ ولكنه".‏

sunnah.com

also referenced under: Book 10, Hadith 1252 (In-Book)