Not sure if this is possible...
If I do a select query like this....
"SELECT NAME, SCORE FROM TABLE", I would like to add a column like this...
"SELECT NAME, SCORE, SCORE_CLASS FROM TABLE", such that a string value like "poor", "fair", "good" SCORE_CLASS will appear in the SCORE_CLASS column of the result set based on the score value:
ie.
If SCORE < 10 SCORE_CLASS = "Poor"
If SCORE >= 10 and < 20 SCORE_CLASS = "Fair"
If SCORE >= 20 SCORE_CLASS = "Good"
(example result set)
NAME SCORE SCORE_CLASS
Bobby 100 good
Billy 7 poor
Jenny 50 good
Julie 15 fair
Theophane 70 good
Can such a query be done in MySQL 3.23? I've been searching the MySQL online docs and have not found anything that seems to apply.
Thanks