How to query an out put value?

You can try to make use of filters in query (likely posts_where) to make it look for match between clean value and MySQL REGEXP command (if it fits, didn’t use it myself) with your logic, run on raw value.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)