One morning when I woke up to perform the Fajr prayer, while going to the bathroom, I've realized that I had a wet dream. So I looked to make sure is there anymore of the sperm coming out, and there was very little. So I waited few more minutes and I urinated, and after that I performed Ghusl. When I was done on the top of my penis there was still little liquid, now my dilemma was is it sperm, urine or water. So I waited another few minutes and made sure that nothing came out, then I performed Wudu and prayed. Brothers could you please tell what should have I done in this situation, to my knowledge I think it was urine but as I said I am not sure so I am asking you.
You did well by taking a ritual bath (Ghusl) when you woke up after having a wet dream. After having a bath, if what you discovered was sperm, which is a white thick fluid emitted by a male or a female as the result of sexual ejaculation, then you are not obliged to perform Ghusl again, because it is pure according to the correct opinion of the Muslim scholars .
'Aa'ishah said regarding sperm: "I used to remove the sperm from the clothes of the Prophet and he would pray wearing the very clothes after that." [Muslim]
However, if the discharge was urine, then it is obligatory to wash ones private parts and clothing and perform ablution before praying. The Prophet said: "Allaah will not accept a prayer of any of you if his ablution is invalidated until he performs ablution again." [Al-Bukhari and Muslim]
The same thing applies if the discharge is Mathy (pre-seminal fluid). Mathy is a thin white sticky discharge caused by sexual stimulation.
For more benefit about the rulings regarding, Maniyy, Mathy, urine, and Wadi (a thick white fluid that comes after some people urinate), please refer to Fatwa: 82518.
Allaah knows best.
You can search for fatwa through many choices