Improved select ... case statements