As a rule, if you would not drink the wine, don't use it for cooking. It is a myth that "poor" wine should be used for cooking.