It’s “The Lady or the Tiger” by Frank Stockton, all the way back in 1882. Here’s a link for the entire short story. Every bit as good as I remember, although I thought a lot more about it as a child. It’s the first story where I remember thinking, “Hey, no fair! There’s no ending!” only to later realize that was exactly the point.