SELECT id,`NAME`,province,city, phone,
CASE sex
WHEN 'M' THEN '男'
WHEN 'F' THEN '女'
END AS sex
FROM `person_info` pi
SELECT id,`NAME`, province, city, sex,
CASE phone
WHEN ISNULL(pi.phone) THEN (SELECT oe.empPhone FROM oa_emp oe WHERE oe.accNum='1')
ELSE PI.phone
END AS phone
FROM person_info PI
WHERE id='11'