Grounding an industrial pipe fitting lamp, which wire to use?
You should be able to purchase a three wire cord with a molded three prong grounding plug on one end open wire ends on the opposite end. These are often sold as electrical appliance replacement cords and should be available at most good hardware stores and big box type outlets. 

Here is an example of one type of these cords:



Make sure to use proper strain relief on the core end at the lamp to keep stress off the internal electrical connections. 

These cords are very similar to if you got a three prong extension cord and cut off one end. You could do this except in many cases any safety agency listing for that extension core becomes non valid once the cord is modified. This may also be a reason to check if the appliance replacement cord that you purchase is marked with a safety agency listing/logo.