Transposed data / convert Rows into columns using InfluxQL

Hello,

I am using Grafana v8.4.10 and the InfluxDB is v1.7.

I have few measurement data related to software version data.
Select query on these gives me data as below.

SELECT * FROM Versions

time version_value_1 version_value_2 version_value_3
time1 value1 value2 value3
time2 value4 value5 value6
time3 value7 value8 value9

Whereas I am looking to get the last value for each field as a row as below.

version_name version_value
version_value_1 value1
version_value_2 value2
version_value_3 value3

Is there anyway to acheive this result in grafana by using any query like below.

select last(fieldKey), last(fieldValue) from versions

Please share if anyone has inputs on this.

Thanks and Regards,
Bhushan