On Fri, Dec 17, 2004 at 16:55:45 +0530,
Kenneth Gonsalves <lawgon(at)thenilgiris(dot)com> wrote:
> hi
>
> table:
>
> name varchar(10)
> fruit integer
>
> i want to write an sql statement like this:
>
> select fruit from table
>
> which should return 'good' if fruit = 1 and 'bad' if fruit =2 and 'rotten' if
> fruit =3
>
> can it be done?
Yes; use a CASE statement.