Is there a way to diagnose ceiling fan 3 speed switch wires?
Go looking for a circuit diagram for your exact model of fan (probably findable on the manufacturer's website) that will tell you how the old switch was connected, which will provide the info needed to connect the new switch. We've discussed this before, but the Android app makes searching for and linking to the previous answer somewhat annoying so I'll leave it o others to provide that link.