select (case when deptId=empId then deptName else deptName+empName end) as userName from 表A