LIKE keyword is usually used to search for a string value ( LIKE (‘%STRING%’) ).

If you need to search one field based on the value from another one, the replacing the string value with the column name like this LIKE (%table.column_name%) or some syntax like LIKE (‘%’+`table.column_name`+’%’)  won’t work.

You need to use the CONCAT operator to make it the correct SQL statement.

LIKE CONCAT('%', table.column_name, '%')