I have two columns, column A contains the state and column B contains the city. A majority of the mapping is correct but for some reason 'San Diego' in column B is mapped to 'AZ' in column A when it should be 'CA' in column A. Below is what I thought I could do but doesn't seem to work. I figure the answer is a CTE or subquery but would love to know if there is a cool alternative way. Thanks!
SELECT
column B,
CASE
WHEN column B = 'San Diego'
THEN column A = 'CA'
ELSE column A
END AS fix
FROM doesnotmatter