Query on variables to select all column

I´m trying to create a query based on Postgresql creating a variable that should select all values from the chosen column (temperature, turbidity, dissolved O2, etc ). Is there somekind of example in that case?