MS SQL formula for converting state abbreviations to state names

If your MS SQL database has state abbreviations and you want to display the full name, add this to your formula in the composer (or better yet, change the ? to the [alias].[fieldname] and add to the App Builder.

CASE
WHEN ? = 'AL' THEN 'Alabama' 
WHEN ? = 'AK' then 'Alaska' 
WHEN ? = 'AZ' then 'Arizona'  
WHEN ? = 'AR' then 'Arkansas' 
WHEN ? = 'CA' then 'California' 
WHEN ? = 'CO' then 'Colorado' 
WHEN ? = 'CT' then 'Connecticut'  
WHEN ? = 'DE' then 'Delaware'  
WHEN ? = 'DC' then 'District of Columbia' 
WHEN ? = 'FL' then 'Florida' 
WHEN ? = 'GA' then 'Georgia' 
WHEN ? = 'HI' then 'Hawaii' 
WHEN ? = 'ID' then 'Idaho'  
WHEN ? = 'IL' then 'Illinois' 
WHEN ? = 'IN' then 'Indiana'  
WHEN ? = 'IA' then 'Iowa'  
WHEN ? = 'KS' then 'Kansas' 
WHEN ? = 'KY' then 'Kentucky' 
WHEN ? = 'LA' then 'Louisiana' 
WHEN ? = 'ME' then 'Maine' 
WHEN ? = 'MD' then 'Maryland' 
WHEN ? = 'MA' then 'Massachusetts' 
WHEN ? = 'MI' then 'Michigan' 
WHEN ? = 'MN' then 'Minnesota' 
WHEN ? = 'MS' then 'Mississippi' 
WHEN ? = 'MO' then 'Missouri' 
WHEN ? = 'MT' then 'Montana' 
WHEN ? = 'NE' then 'Nebraska' 
WHEN ? = 'NV' then 'Nevada' 
WHEN ? = 'NH' then 'New Hampshire' 
WHEN ? = 'NJ' then 'New Jersey' 
WHEN ? = 'NM' then 'New Mexico' 
WHEN ? = 'NY' then 'New York' 
WHEN ? = 'NC' then 'North Carolina' 
WHEN ? = 'ND' then 'North Dakota' 
WHEN ? = 'OH' then 'Ohio'  
WHEN ? = 'OK' then 'Oklahoma'  
WHEN ? = 'OR' then 'Oregon' 
WHEN ? = 'PA' then 'Pennsylvania' 
WHEN ? = 'RI' then 'Rhode Island' 
WHEN ? = 'SC' then 'South Carolina' 
WHEN ? = 'SD' then 'South Dakota'  
WHEN ? = 'TN' then 'Tennessee'  
WHEN ? = 'TX' then 'Texas'  
WHEN ? = 'UT' then 'Utah' 
WHEN ? = 'VT' then 'Vermont'
WHEN ? = 'VA' then 'Virginia' 
WHEN ? = 'WA' then 'Washington'  
WHEN ? = 'WV' then 'West Virginia'
WHEN ? = 'WI' then 'Wisconsin' 
WHEN ? = 'WY' then 'Wyoming' 
    ELSE 'Other'
END