In mysql table one of the column is json, I want to select JSON field and set as column name 

Json field value for class 3 

```
{"name": "xyz 1", "email": "xyz1@example.com"}
{"name": "xyz 2", "email": "xyz2@example.com"}

```

Class 4

```
{"first_name": "abc1", "last_name": "pqr1"}
{"first_name": "abc2", "email": "pqr2"}

```

I can set specific key as a column name like 

```
select json_extract(my_tags,'$.name') as name from {table_name} where class = 3;

```

But I want all key values as column name in select result. The key values will be different each time
From the above example results column should be as follows 
 **name, email**

```
select {my_tags} as name from {table_name} where class = 4;

```

But for class 4, needs column name should be **first\_name and last\_name**