I have a student_info table that has a column marital_status_code of varchar(60) data type. I have a query like this.
SELECT CASE marital_status_code WHEN '1' THEN 'Single' WHEN '2' THEN 'Married' ELSE 'Unkown' END AS 'Marital_Status' FROM student_info;
The result returns that all records have 'Unknown' Marital_Status even when there are records with 1 or 2. The table contains data uploaded from a csv file.
Using a simple select statement with a condition "WHERE marital_status_code = '1';" also returns no record.
I can't find a way to fix this. Any assistance on this matter is appreciated.