My requirement is to extract the text TSI from a column data which is of the form "TSI0123". I used the substring function to extract the first 3 char to get the word "TSI". But, some cloumn data is not in the form "TSIxxx" and the substring function prints the first 3 char of them also. I want the quert to check whether the first 3 char is "TSI" if not print "NULL" in the result.