Usually yanking on the charging handle makes it worse by jamming the case harder above the bolt and wedging the whole mess in tight.
The fix Panone shows at 1:30 in
this video that Mike C linked is similar to what I've seen work the easiest.
Use your finger, stick, blade or other suitable object in the ejection port or magwell to press the bolt to the rear. That takes the tension off the case and lets it fall out from above the bolt.
If you made the mistake of operating the charging handle and jamming the case in harder it'll take more force to push the bolt back and free the case. In that situation doing like Panone shows and whacking the charging handle forward while pushing backwards on the bolt will do the trick.