As far as I know this is not possible in the Ad-hoc database queries plugin. It treats any html tags as normal text.
You could try to use the Configurable Reports plugin to do this sort of thing. It does allow some basic tags. You will probably have to take that column apart with some SQL to get exactly what you want (eg make the links work).