A consultant was an individual, who advised a person or an institution as an expert in a specific field.
Private investigators sometimes worked as consulting investigators assisting the police. William T. Riker called Sherlock Holmes "history's greatest consulting detective" in 2364. (TNG: "Lonely Among Us")
In 2374, Morica Bilby was employed by the Tigan family as a favor to the Orion Syndicate, paid as a shipping consultant but without any actual work done, in order to provide for her and her children. (DS9: "Prodigal Daughter")