Portable lamps (at least in the US) are generally designed without a ground wire. The bodies of the lamps, even if metal, are designed not to be likely to be prone to a short to the hot lead. The standard lamp cord is therefore two wire (hot and neutral). Most modern lamps are polarized, meaning the cord/plug is designed to ensure that the hot lead is attached to the hot side of the outlet.
Sconces and other lamps that are intended for fixed mountings on electrical boxes have a hot lead, a neutral and a ground. The ground is the safety measure in case of a short.
When you convert a fixture intended for use with a ground wire to a plug-in setup, you need a grounded cord to preserve the safety factor. The simplest way may be to buy a grounded extension cord, cut off the socket end and splice the cord with the plug (male) end into your fixture.
Attach the hot lead to the black wire of the fixture, the neutral to the white (the neutral wire is attached to the larger blade of the plug and the casing is sometimes ridged), and the ground to the green (or bare).
You can then run the cord under a cord cover to a conventional grounded outlet.
P.S. Be sure to use a bushing or something similar to prevent any cord/cable from being pulled through and cut or frayed by metal edges at the point where it exits the fixture or metal cable cover.
CAUTION
This whole discussion assumes that you are installing this permanently (a wall fixture is not well protected at the back from damage or short) and on an interior wall. Exterior fixtures are specifically designed to attach in an exact way to exterior boxes to ensure that they are water resistant. Any compromise of that attachment mechanism may lead to leakage, shorts and danger of electrocution or fire.
Improper Electrical Wiring constitutes a serious life safety hazard. It can be the source of structural fire and potentially fatal shocks.
I am not saying that you can't splice a common electrical wall switch into an extension cord. I am saying that it is not a good general practice.
Consider Instead
Installing a suitable hardwired outlet and wall mounted switch using techniques suited for permanent installation in the structure.
Alternatively, consider using a listed extension chord with an integral switch such as this or that.
Best Answer
They make a tool called a continuity tester. These also come in the form of a meter product that can also measure voltage and current. You can pick these up at most auto parts stores or hardware stores for a relatively low price.
To use the continuity tester, you would connect the clip to one of the known wires, and then touch the end of the probe to each of the unknown wires in turn. Which ever wire lets the bulb light up is the same wire as the known wire. Obviously make sure everything is unplugged from mains power before doing this.
To use a multimeter for continuity testing you make sure that the cord/wiring that you are testing is not connected to any mains outlets. Then make sure the two test leads are plugged into the black COM jack and the red VOLT/OHM jack. Rotate the range selector to the lowest OHMs setting. Momentarily tough the two test lead ends together to verify the meter is working correctly. The meter should show a reading of near zero ohms. In the case of a meter like shown above a zero ohm reading will deflect the needle all the way to the right. Next step is to touch one of the test leads to one of the known wires. Then at the same time touch the other test lead to the unknown wire ends in turn. The one that causes the meter to show a reading near zero ohms (deflects the needle to the right) will be the same wire as the known wire.