select name,case gender when
‘男’ then '1' else '2' end from mytable