I want to name the column alias based on the column value in mysql. Is that possible?
Something like this;
select case when answer_type = \'RB\'
No, that's not possible in pure SQL. You'll probably have to query the data out and then process it in whatever application is executing the query.