SELECT *, case when (col1 not like '') then col1 else col2 end AS alias1 FROM table1