I have values like (P12, I2) and I want to search them in semicolon-separated MySQL column name custom_column, which has values like P%
or P2
or P2;I2
or P%;I2
. (Yes, it should work with wildcard too.)
I tried as below in where clause.
WHERE 'P2' LIKE CONTACT(table2.custom_column, '%')
But it is not working.
How can I solve this?