Macro variables will not change during data step execution, therefore does not your code work.
Your example has only two variables to chose between. The easiest is just to hard code an IF-statement. If you in you real life has tons of columns, you may want to build something more generic. If you for instance can have a name standard for you analysis column, maybe you can generate a SELECT/IF/CASE statement as a macro pre-process using table metadata.
/Linus
Data never sleeps