I am wondering why I cannot use variable column name like that:
declare @a as varchar; set @a=\'TEST\' select @a from x;
Thank you
Because the column names are resolved at compile time not at run time for the SQL statement.