Both prescription and non-prescription medications are exempt from the 3oz rule. You must present them to the TSA for screening separately from the rest of your liquids. My experience is that the TSA will test them, but that only takes an extra few minutes. I've never had trouble with the TSA telling me they weren't allowed.
That said, to avoid the extra screening, I do place over-the-counter liquid meds in my checked luggage if I have a checked bag. But I would never do that with a prescription medication. Those I always keep in my carryon because it's not as easy to replace them.