The pilot, who was flying a tailwheel-equipped aircraft, thought he was landing into a quartering headwind. But according to pilot-rated witnesses, the wind shifted just prior to the aircraft crossing the threshold. After the aircraft touched down, the tailwind lifted its tail into the air, and the pilot began having difficulty maintaining directional control. During his attempts to remain aligned with the runway, the aircraft departed the side runway surface, and encountered soft, wet terrain. Soon after encountering the soft terrain, one of the main gear legs separated from the aircraft.