Sheikh Yusuf Al-Qaradawi, states: “Some jurists do not consider medicine to be necessary as food. They cited the following Hadith to support their argument. The Prophet (peace and blessings be upon him) says, “Allah has not made things that are unlawful for you to consume to be your medicine.”
On the other hand, other jurists maintain that medicine is so important and necessary as food. Both of them preserve man and safeguard his life. They said that the Prophet (peace and blessings be upon him) has allowed both `Abdur-Rahman ibn `Awf and Az-Zubayr ibn Al-`Awwaam to wear silk garments, though male Muslims are not allowed to wear it, because of necessity. The two men were suffering from some sort of itching.
It seems that the aforementioned view goes in harmony with the spirit of Islam. However, there are certain conditions that must be fulfilled in order to take a medicine containing haram ingredients. Such conditions may be classified as follows:
1. The medicine containing haram ingredients (alcohol as stated in the question) must be necessary for the life of the person who takes it.
2. A knowledgeable and trustworthy Muslim physician should recommend such type of medicine containing alcohol.
3. The person is not allowed to take this particular type of medicine while there are other lawful medicines available.”