Birth control pill headaches

Can the birth control pill also help against headaches during the menstruation? Or is it only for cramps and back pain?