I'm trying to judge by the name of a car dealership whether a specific car is their brand or not. So with:
select car_make, dealer_name,
case when ('%' || dealer_name || '%') ilike car_make THEN 'OnBrand'
END
from table
Ideally, when searching a car with make Nissan and a dealer named Local Nissan Dealer, the third column would contain OnBrand, but it's returning
Nissan Local Nissan Dealer <null>