If you said something like, "John Smith, who has been a judge in the court, said..." it would mean that he was a judge in the past, but is not a judge now. However, if it said, "John Smith, who has been a judge in the court for five years, said..." it would mean he is a judge now.