Sherlock Holmes never held a formal professional title. He was a consulting detective, meaning he was hired by clients to solve mysteries and crimes.
While he was incredibly skilled and knowledgeable, he was not a police officer, nor did he have a formal degree or certification in any field. His reputation and abilities were his credentials.