In my application I have a very simple sql statement that looks like this:
select state from users;
And it gaves me the following result:
state
-------
5
(1 row)
But I want to have some text in result instead of number. For example:
- if state is equal to 5 state should be 'imported'
- if state is equal to 4 state should be 'importing'
How can I do this?