Q&A about the site for students, teachers, and linguists wanting to discuss the finer points of the Japanese language
-- select users coming from India and China -- after checking logical model, the user table has all info we need /*SELECT * FROM USERS WHERE Location like '%China%' OR Location like '%India%' OR Location like '%USA%'*/ -- Rewrite by using Case Then -- SELECT ID, Location, 'Country coming from' = CASE WHEN Location like '%India%' THEN 'coming from India' WHEN Location like '%China%'THEN 'coming from China' WHEN Location like '%USA%' THEN'coming from USA' ELSE 'coming from Other Countries' END From USERS;