Comparing 2 column values in grafana


I am using grafana to create dashboards. My data source is ELK. I have created a table in the grafana dashboard which has 5 columns.

2 of the columns can have same or different values.

I want to display only those rows for which the 2 column values are same.

example grafana table-


In the above table, the col1 and col3 are have same values for row 1 and row 3. I want to show only 2 rows (1st and 3rd one) which has same values.

Please help. I am stuck.