I have a table with the following columns: id, firstname, lastname, category.
And let's say i have data with categories like: action, comedy, drama, horror.
My query is

```
SELECT * FROM tablename WHERE firstname LIKE '%John%'

```

The query will bring all the records that contain 'John' in firstname, and let's assume that the records have different values for categoty: action and comedy only.

How to find out the list with all the values available in category column for this specific search.

Thanks!