Civil services exam has a significant number of questions from history at the prelims stage and in General Studies paper at the mains stage of the exam. Additionally, the exam has History as an optional subject, so you do not have to learn a new subject from scratch. So, a degree in history is beneficial in the civil services exam.