Show/hide columns in a table

Hello!

I want to create a table with multiple columns and also use a filter parameter. When a value is selected in that filter, i want to display only 4 out of 7 columns let's say. When the other value of the filter is selected, display the other 3 columns. Is that possible?

Thank you!

0 0 64