I have 2 tables
Table 1:
DB1, DB2, DB3, DB4, DB5, Some other identifiers
Table 2:
EnumText, EnumValue, Some other ident
You can't have dynamic aliases without dynamic SQL. If you did change the resultset column names, how do you access them via name? (I wouldn't use index because it will break)
So, you can add a fixed column to describe it. And read that
Select
DB1, foo.EnumText AS DB1EnumText,
DB2,
DB3
from
Table1
CROSS JOIN
(Select EnumText from Table2 where EnumValue='DB1') foo