If I understand correctly you have a 3-speed fan.
And you need a 3-speed replacement pull-chain-type switch
Lowes carries 3 speed fan switches in the light fixture department.
These switches have multiple wires.
At any given time, there is one-and-only-one wire that connects to power from wall switch.
Lets call this the Power wire.
As you pull the chain, the power passes through the switch and goes to one-and-only-one of the other wires.
The other wires connect to windings in the motor.
The different motor windings control fan speed.
The key to replacing the switch is recording where each wire went before you disconnect old switch.
Once you know which of these wires is the Power wire, then you can test other wires with a continuity tester.
You also know the pull-chain sequence is OFF - HIGH - Medium - Low
Mark wires in fan and mark wires on old switch.
Pull out old switch.
Use regular electrical tester to find which wire in the fan is the power wire (separate wires, turn on power and test each wire to metal part of fan)
Now test the switch wires.
The switch is out of the fan.
You marked the wires so you know which wire is power wire.
Put the continuity tester on the power wire.
Test power wire to each of the other wires.
Click the switch and test to each of the other wires. Mark which wire lights up continuity tester.
Click the switch and test again. Mark which wire lights up continuity tester.
Click again, until each wire is marked in the sequence.
When you click the switch and no wire lights up, then that is the Switch OFF position.
Do the same test on the new pull-chain switch.
Connect the wires to match your testing.