Dynamic select column name on the basis of a flag
If your final query returns 2 columns, it returns 2 columns. You can move CASE to the SELECT sentence but it will return 2 columns.

SELECT CASE WHEN @flag1 = 1 THEN #{COLUMN_VALUE} END AS col1, 
       CASE WHEN @flag1 &lt;&gt; 1 THEN #{COLUMN_VALUE} END AS col2 
FROM   ACCOUNT_USER table 
WHERE  acct_id = #{accountId};


In case you need only one column named as COL1 or COL2 I'd suggest to use a dynamic query.