Depends on the specimen you've got.
The bigger they are, the less likely to be consumed. Also, if they're in the tank before the fish, this also improves their odds.
Regardless, if we're talking about small shrimp (ie - anemone shrimp), they'll probably be eaten regardless.