When you cook with wine you lose all the alcohol, which is the only constant between two bottles of wine. You're just left with the rest from which comes the taste.
There's no such thing as "cooking wine". Bad wine is bad wine. If you wouldn't drink it, don't cook with it.
That all being said, I personally think wine snobbery is basically bullshit and I think blind taste tests tend to support that view.
Still, a wine isn't bad because it's $5. Nor is it good because it's $30.
When I lived in the UK I'd often get by with the table wine from Tesco for under 5 pounds and honestly it was fine. I found quite a few decent bottles of Portugese and Chilean wine for under 10 pounds. Beaujolais wasn't more than 3-5 pounds.