You will need to use dynamic SQL to do this sort of stuff.

Thanks.

Syed