3
Use case ...when:
select nm_cliente, case tp_sexo
when 1 then 'Masculino'
when 2 then 'feminino' end as strSexo
from tb_clientes
See an example working on SQLFIDDLE
References:
http://imasters.com.br/artigo/18681/mysql/utilizando-select-case-com-mysql/
https://stackoverflow.com/questions/9236770/case-within-a-select-case-in-mysql
http://dev.mysql.com/doc/refman/5.7/en/control-flow-functions.html
Sex is another table?
– user28595
Not a column of the clients table
– Matheus Araujo