You need to use
ORDER BY clause[
^].
SELECT *
FROM (
SELECT CurrCode, YEARNO, Monthno, TOTALAMOUNT
FROM [dbo].[ML_tbl_Analaysis]
where Currcode =@CURRCODE
) tbl
PIVOT (sum(TOTALAMOUNT) FOR [yearno] IN ([2016],[2017],[2018],[2019],[2020],[2021],[2022],[2023],[2024],[2025])) pvt
ORDER BY pvt.Monthno