Recent discovery of the time reversal symmetry breaking magnetic Weyl semimetals (WSMs) has created a huge surge of activities in the field of quantum topological materials. In this work, we have studied systematically various magnetic orders, electronic structure and the interplay between the magnetic order and band topology in one such material, EuMg2Bi2 (EMB) and its Ca doped variant using first principle methods within the framework of density functional theory (DFT). Our thorough investigation reveals the existence of various magnetic order driven topological phases (for example, topological insulator in the A-type antiferromagnetic (A-AFM) phase with Eu moments aligned along the crystallographic a or b direction, Dirac semimetal in the A-AFM phase when Eu moments are parallel to c direction and Weyl semimetal in the ferromagnetic (FM) phase with Eu moments pointing along the c direction) in this material. These phases are found to be energetically very close and hence are expected to be tunable from one to the other by an external handle such as magnetic field or chemical substitution. Most importantly, we observe the existence of a single pair of Weyl points (WPs) connecting valence and conduction band very close to the Fermi level (FL) along Γ-A direction in the FM state of EuMg2Bi2 with Eu moments aligned along the c direction making it an ideal Weyl semimetal in its FM state exactly similar to EuCd2As2. On doping 50% and 67% Ca at Eu sites, we observe the single pair of WPs to move even closer to the FL which is highly desirable for application purposes. Further, we observe that the separation between the WPs in the pair decreases in doped compounds compared to that in the parent compound which has direct consequence on anomalous Hall conductivity (AHC). Our first principles calculation of AHC shows high peak values exactly at these WPs and the peak height decreases when we dope the system with Ca. Therefore, Ca doping can be a good external handle to tune AHC in this system.