Educational data mining (EDM) is an emerging topic in recent years steered by data mining and machine learning techniques to enhance students' overall learning experience and academic progress. In recent years EDM techniques are frequently used to improve assessment systems but the evaluation procedure is majorly marks driven. Developing an evaluation system to distinguish candidates, based on their ability to answer cognitively difficult questions is a challenging task. In this study, a unique methodology is proposed to dynamically rank the candidates to develop an outcome-based online examination system that will properly evaluate a candidate's cognitive competencies. The questions are segmented into different cognitive groups based on classical Bloom's educational taxonomy. The Jenks Natural Breaks Optimization technique is used here to segment the questions and as a result, distinct question clusters based on different cognitive levels are obtained. Students are evaluated with different questions from these cognitive groups and ranking is done for individual candidates considering both the marks of the questions and his/her ability to solve questions from different difficulty levels.