Given the conflicting information about drugs and the powerful hold they seem to have over young and indecisive minds, it is no wonder your students are curious about your position on this matter. You could have said you did take drugs and that it was a mistake, but I would not have advised that.
This is the guff of nervous politicians.
Young students ask me this question about twice a term. I choose not to answer it directly for a number of reasons. First, unless it is a health education lesson devoted to the issue, it is irrelevant. Second, it is a personal issue and none of the pupils' business. Third, avoid any topics that can be easily misinterpreted. You don't need to be stuffy about it, just let them know where they can seek advice if they need it.
It is inevitable in the course of your job that you will talk with pupils about their interests out of college and yours. If some of these interests coincide then there is nothing wrong with that. But these "friendships", unconsciously or not, must not change the way you deal evenly with your class.