In the Merchant of Venice, suitors attempting to win Portia's hand must choose from 3 caskets (of gold, silver and lead). Those who chose wrong must leave immediately and never marry anyone. One who chooses correctly gets the girl. In the discussion of this subplot, Hermann Sinsheimer, in Shylock writes that it "travelled a long road which leads back at least as far as the Talmud" (page 88) but with no citation. The Encyclopædia of Religion and Ethics says the same on p. 569, "Stories similar to that of the three caskets in Shakespeare's Merchant of Venice are distributed more widely. They are found in the Talmud as well as in Buddhist sources" but with no citation.
Does anyone know of a Talmudic anecdote which relates a similar story of choosing (aside from the medrash regarding baby Moshe and the coals vs. jewels, which is not nearly close enough).