regexp を使用する。

select * from regexptest where str regexp ' | ';
[正規表現を使ったパターンマッチングを行う(REGEXP演算子) MySQLの使い方](https://www.dbonline.jp/mysql/select/index8.html)