Select text from from drop down with __text and __value

am haivng a query for avariable
select a as __text, b as __value from xyz.

for my other queries in 1 i need to use a and in other i need to use b.

when i do ‘$variablename’ as getting only b how cna i get a content.