I have a custom post type that I want to query a dynamic category name from a custom meta field

Change this

'category_name' => '$key_1_value',

To this

'category_name' => $key_1_value,

You don’t need ” around $key_1_value

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