Is this sentence correct?
There was no choice for me to go to school while I really wanted to visit my friend at the hospital yesterday morning
I’m most concerned with how to correctly use “There’s no choice” in a sentence.
You're missing a "but":
There was no choice but for me to go to school yesterday. I would rather have visited my friend at the hospital.
You can also say "I had no choice but ..."
I had no choice but to go to school yesterday, instead of visiting my friend at the hospital like I wanted.
Side note: British speakers frequently say "at hospital" instead of "at the hospital".