select decode(field1,'0','A','1','B') from tab1;