SyntaxFix
Write A Post
Hire A Developer
Questions
What you want is called a pivot, and it's not directly supported in MySQL, check this answer out for the options you've got:
How to pivot a MySQL entity-attribute-value schema