It is narrated from Hazrat Abu Huraira (may Allah be pleased with him) in a marfu' form that whoever (being deceived) buys such a she-camel or goat, then he has the choice of one of two things, whichever is better for him: either he keeps the animal with himself (and settles the matter), or he returns the animal to its owner.
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 7380