We had a hard time with this when our son had ear infections! When he was about 1 to 1.5 it was really hard to get him to drink his medicine. We would basically just try to do it quickly and sneak as much in before he realized how bad it tasted
One time we also were able to get a shot instead of the oral medication for his ear infection - our doctor told us about it when we told her how much he was resisting taking the oral medicine (he would just clamp his lips shut tight!). It was much easier than trying to get him to drink the stuff, but the shot made his leg pretty sore for a day. It's all about trade-offs I guess!
We used to have a horrible time with this. Finally the doctor just looked at us and said, you are the adults. We felt a little foolish so we went home and were loving but firm.
We explained that she had to take her medicine but as soon as she did, she could have a popsicle. Then we made up a song, Medicine-Pop, Medicine-Pop. I was holding the popsicle in my hand and once the meds were down I immediately handed her the popsicle. It worked for us anyway. I suppose it would work with any treat that the child loves but is not able to have all of the time. It would have to be something special.