I would like to use a single SQL statement to do the following:
If the digits in the last two positions of the string are 20, e.g. '200720', then I would like the value 'Spring' plus the first 4 digits to be put into the variable TermPrint. E.g. for the value '200720', TermPrint should have the value 'Spring 2007'. If the digits in the last two positions of the string are 10, TermPrint should have the value Fall 2007. If it is 00 then TermPrint should have the value Summer 2007. Finally for 15, the value should be Winter Intersession 2007.
I am not sure how to do that in an SQL script. I have to use SQL and not PL/SQL. Otherwise I could have used the IF statement.