How to show results in rows and not columns? Row_Number function?

I have a simple query that pull in only one row of results, in columns. I want the results to show in rows instead of columns.
My example query looks like this:

select *
from mydatabase

results show like this:
2021 2022 2023 2024

I want them to show like this:
2021
2022
2023
2024

when I try a Row_Number function I just get the same column results but with a '1' now added
select *
,ROW_NUMBER()over(order by(select 1)) as number
from mydatabase

shows results as:
2021 2022 2023 2024 number

You would use UNPIVOT to change columns to rows:

Example:

DROP TABLE IF EXISTS #;
CREATE TABLE #([2021] INT,[2022] INT,[2023] INT,[2024] INT)
INSERT # VALUES(1,2,3,4),(5,6,7,8)

SELECT val,col FROM #
UNPIVOT (col FOR val IN ([2021],[2022],[2023],[2024])) z

I think this gets me where I need to be, Thanks!

hi

hope this helps

-- one way

-- another way