She was told that in order to continue running in women's races, she would need to take medication to lower her natural testosterone levels.
'I didn't know if I was going to have a heart attack'
She said: "It made me sick, made me gain weight, panic attacks, I don't know if I was ever going to have a heart attack. It's like stabbing yourself with a knife every day. But I had no choice.
"I'm 18, I want to run, I want to make it to [the] Olympics, that's the only option for me. But I had to make it work."
Jonathan Taylor, World Athletics' lawyer, disputed that the medication given to Semenya and others was unhealthy.
He told the programme: "You say, medically, it's not healthy for me, then my question back to you is: 'Why do the world's leading experts say that that is what we would prescribe?'
But Semenya hit back: "Jonathan must cut his tongue and throw it away. If he wants to understand how that thing has tortured me, he must go and take those medications. He will understand."
Semenya, now 31, took the medication for several years before lodging a legal challenge against rules currently governing races taking place over distances between 400m and a mile.
After unsuccessful appeals at the Court of Arbitration for Sport (CAS) and Switzerland's Federal Supreme Court, she was unable to defend the Olympic titles she won in London and Rio at last year's Tokyo Games.
She is currently awaiting a hearing at the European Court of Human Rights and, in the meantime, has been competing across longer distances, clocking a personal best time of 8min 54.97secs over 3,000m in March.
In a scathing Twitter post days later, she wrote: "So according to World Athletics and its members, I'm a male when it comes to 400m, 800m, 1500m and 1600m.
"Then a female in 100m, 200m, and long-distance events. What a research. What kind of a fool would do that?"
World Athletics recently confirmed it would not be changing its regulations allowing DSD and transgender athletes to enter women's events if they lowered their testosterone.
That was despite reviews being launched in both swimming and cycling following an outcry over similar rules permitting trans athletes Lia Thomas and Emily Bridges to switch from competing against men.