Since you didn't provide a picture, or a very helpful description of what you're looking at. I'll try answering your question by explaining how the switch itself works, which will hopefully help you understand the problem better.
Single Pole Single Throw (SPST) Pull Chain Switch
The pull chain switch that controls the light(s), is a single pole single throw (SPST) switch. It has two positions ON (Closed), and OFF (Open). Drawn simply, it would look something like this.
![Quarter turn switch (Closed)](https://i.stack.imgur.com/KfmZ7.png)
Switch shown in ON (Closed) position.
When the switch is in the ON (Closed) position, current is allowed to flow through the switch, through the light(s), and back to the the source (via neutral).
![Switch Closed Current flows](https://i.stack.imgur.com/GaAkb.png)
When the chain is pulled and released, the internal contact rotates 90° (1/4 turn) into the OFF (Open) position.
![Quarter turn switch (Open)](https://i.stack.imgur.com/u7E3N.png)
When the switch is in this position, current is not allowed to flow through the switch, and the light is not lit.
![[Switch Open Current does not flow](https://i.stack.imgur.com/2oXXC.png)
This is why the pull chain switch that controls the light(s) only has two leads.
Single Pole Multiple Throw (SPnT) Pull Chain Switch
The pull chain switch that controls the fan, is a single pole multiple throw switch. It has multiple positions, which allows it to control the speed of the fan. Draw simply, it would look something like this.
![enter image description here](https://i.stack.imgur.com/r2bCG.png)
Switch shown in OFF (Open) position.
When the chain is pulled and released on this switch, the internal contact rotates 45° (1/8 turn) to the next position.
![enter image description here](https://i.stack.imgur.com/3r5la.png)
Another pull, another turn.
![enter image description here](https://i.stack.imgur.com/rPFM6.png)
Pull again, turn some more.
![enter image description here](https://i.stack.imgur.com/XJ3Fv.png)
One final pull brings the switch 180° around, and again to the OFF (Open) position.
By manipulating the output of this switch, the fan is able to whirl around at various speeds depending on the switches position. The number of output leads, will depend on the switch. How those leads are connected to the fan motor, will depend on the fan manufacturer. This simply illustrates the basic principle of how the switch works.
As always electrical work can be dangerous, never be afraid to contact a qualified Electrician
Lamp cord typically comes in 18/2, and 16/2 varieties. Neither of which has a grounding conductor. If the lamp...
- is intended to be used indoors
- will connect to the electrical system through a cord-and-plug attachment means
- Does not have any exposed metal parts
you should be fine using a 2 wire attachment cord. However if the lamp...
- will be used outdoors
- will be hardwired
- has exposed metal parts
then you should consider using an attachment cord with a grounding conductor, and connecting the grounding conductor to the grounding conductor in the fixture.
Best Answer
The switch is supposed to be in the hot wire, and in your lamp the black goes to and from the switch. In the house wiring the hot wire is the one with the black insulation, the neutral has white insulation and the ground is often bare, but may be green insulation.
In your lamp base the black goes through the switch and was at one time connected to four smaller black wires, but the connection has been broken. If you want to connect a flat polarized grounded cord to this lamp, know that the center wire in the cord is the ground (connect to the bare wire in the fixture and, of the two outside wires, the smooth one is the hot (connect to black of light fixture) and the ribbed one is the neutral (connect to white of light fixture).
EDIT
If you want to do this, you would have to attach the fixture to an electrical box (e.g., a pancake box) which would be surface mounted where you want the lamp. The cord would come out a hole in the back or side of the box and the cord would have to have a "strain relief" on it. metal pancake box
But for all the trouble you'd have to go through (and some expense) to repair and adapt this fixture, it would be better to just buy a new fixture that is designed to do what you want.