--convert the phone data type into text to find specific numbers select *, case when phone::text ilike '435%' or phone::text ilike '%233%' or phone::text ~ '23' then 'yes' else 'no' end as test from x_csv as xc
--convert the phone data type into text to find specific numbers select *, case when phone::text ilike '435%' or phone::text ilike '%233%' or phone::text ~ '23' then 'yes' else 'no' end as test from x_csv as xc