How to hide columns using formula and which formula to use. For example, if my column value is equal to 0, it should automtically hide those columns and if cell value if equal to 1 then it should display the values of that column.
You don't need to use a formula as such as you need to use a filter
I would, however, recommend having a separate module to check for 0s and 1s in a boolean flag (this is the most efficient filter type to use.
There is a lot of information in filters here:
I hope this helps