The story: Raja Drupada had 3 kids called Shikhandi, Drushtadyumna and Draupadi, but,when Shikhandi was born, was born a girl, an astrologer who predicted her future told her parents that the girl would transform into a boy at a certain age. Shocked to know this, her parents got her married to another princess. But after a few days the princess who was officially known to be Shikhandi’s wife suspected her husband, she doubted as to why Shikhandi never had sex with her or even change clothes in her presence. She hired a maid who would slacken the lock by which the princess could sneak-in to find the truth. One fine day , when she saw Shikhandi stripping learnt that she was being cheated, she couldn’t bear the insult and despair haunted her. She at once went to her parents palace and narrated the story of how the entire family was being cheated, for which the king announced, of waging a war against Shikhandi’s kingdom. Scared of the consequence Shikhandi fled
From the palace and ran into the forest where there was a gandharva, who was a hermaphrodite and took sanyasa(or lived detached from the world) because he found no sexual ecstasy in the world where he lived. He learnt with his knowledge of samudrika shastra looking at Shikhandi the princess, was born to kill Bhishma and was in need of a sex change. He and the princess had a verbal treaty among themselves that they would have their sex changed, which both craved for. Hence the breasts and the vaginal organs were transplanted to the sage and his penis was transplanted to Shikhandi, both in this circumstance were donors and acceptors of the organs which were to be replaced. This was done by the sage under great medical care and hygiene, it is said. Happy with their new lives which they were in actual need of, returned back to their places, when Shikhandi returned back to the palace where his father-in-law was waiting eagerly to see if what his daughter said was true. Stripped Shikhandi in the court, in the presence of many and was shocked to see a penis in the place of a vagina, in accordance to what his daughter had mentioned. Finally, couldn’t react for his hasty decision and felt humiliated, thus blessed them both and left. At the end of Kurukshethra war, when Bhishma had to face Sihkhandi in war, couldn’t fight against him, but had to face defeat because though Shikhandi was a man now was once a woman and the Vedas say that a specimen’s sex is judged by his or her birth and not by what is he or her at present. This says that there were techniques by which people used to secretly change their sex using techniques that only a few knew and lived a usual and desired life. But this was restricted to a few Hijras or transgenders(men who had breasts and women who had a few manly features, like hairy bodies and no breasts etc), because a few percentage of hijras or transgenders had to be present in the society for auspicious occasions to bless people and only if they wished to, the choice or the way they opt to live was not influenced by any. Moreover being a Transgender or a Trans-sexal was a mark of respect as they were clandestine to royal family affairs.
This technique was later not taught to the generation next, because there were many who misused this knowledge, to forcibly change the sex of people.