views:

18

answers:

1

Here is my query

Select Gender from Table

The result pane shows
1
1
1
2
2

But i want the results to be
Male
Male
Male
Female
Female

The names Male and Female wont be present in my database.... I want to just hardcode the names based on values from the select statement....

+4  A: 

try

Select case WHEN Gender=1 THEN 'Male' ELSE 'Female' end Gender  from Table
RRUZ