my optical cable cord is stuck in the tv how can i get it out?

The optical cable clicks in when you press it to hold the cable in place. There are no electrical connections since it is optical. Unless it was glued in it should come out with a tug. Use a pair of pliers if needed and pull straight out slowly. A small amount WD40 might help but might not be good for the plastic.
Breaking the cable is better than breaking the jack on the TV.