Cask wine is fine for cooking, but get one that you would be happy to drink. Nasty wine = nasty flavour in your cooking.

HTH