As suggested in https://stackoverflow.com/a/79454581/16007912, one can join a temporary table containing the term
s for comparison and compare column1
and term
per row:
SELECT t.*
FROM abc t, TABLE(VALUES ('a1'), ('b1'), ('c1') AS search_terms(term)
WHERE t.column1 LIKE search_terms.term || '%'
If your search terms are already in a table then use that table instead of the temporary table.