SELECT p.ID as post_id, t.slug as product_color
FROM wp_posts p
LEFT JOIN wp_term_relationships tr ON p.ID = tr.object_id
LEFT JOIN wp_term_taxonomy tt ON tr.term_taxonomy_id = tt.term_taxonomy_id
LEFT JOIN wp_terms t ON t.term_id = tt.term_id
WHERE
tt.taxonomy = 'product_colors'
AND p.post_title = 'QUADRATL SIDEBOARD' AND p.post_status = 'publish'