Witnesses and Documents are the main sources of Evidence. A witness is a person who gives testimony or evidence before any Court. As a matter of fact every person is competent to give evidence but they cannot be compelled to give Evidence. There are certain persons who enjoy certain privilege and they cannot be compelled to testify. E.g Judges, Magistrates etc.
Judge and Magistrate as Witness
According to Section 121 of Indian Evidence Act 1872, "No Judge or Magistrate shall, except upon the special order of some Court of which he is subordinate, be compelled to answer any questions as to his own conduct in Court as such Judge or Magistrate, or as to any thing which came to his knowledge in Court as such Judge or Magistrate but he may be examined as to other matters which occurred in his presence whilst he was so acting."
(a) A, on his trail before the Court of Session, says that a deposition was improperly taken by B, the Magistrate. B cannot be compelled to answer question as to this, except upon thee special order of a superior Court.
(b) A is accused before the Court of Session of having given false evidence before B, a Magistrate. B, cannot be asked what A said, except upon the special order of the superior Court.
(c) A is accused before the Court of Session of attempting to murder a police-officer whilst on his trail before B, a Session Judge. B may be examined as to what occurred.