SQL server compare a field with another that is composed of a list separated by commas of the 1st field I need to execute the below query but I have a problem. 

I cannot use 
tTerritorio.terrNome = tContactoTerritorio.territorios because territorios is a list of several terrNome separated by ,

How can I make this match so that I can retrieve the information I need?

select terrNome As Territorio, espDescricao AS Especialidade, COUNT (distinct contNome) AS 'Nº Médicos'
from tContacto, tContactoTerritorio, tTerritorio,tEspecialidade
where tContacto.contID=tContactoTerritorio.contID and tContacto.tpcontID=120
and tTerritorio.terrNome = tContactoTerritorio.territorios
and (tEspecialidade.espID=tContacto.esp1ID or tEspecialidade.espID=tContacto.esp2ID or
tEspecialidade.espID=tContacto.esp3ID or tEspecialidade.espID=tContacto.esp4ID or 
tEspecialidade.espID=tContacto.esp5ID)
group by terrnome, espdescricao
Maybe a simple like will work for you:

','+tContactoTerritorio.territorios+',' like '%,'+tTerritorio.terrNome+',%'


I'm adding commas at the beginning and end of territorios assuming the first and last occurrences don't have them. Then you look for '%,terrnome,%'.
(Obviously this is a terrible way to search for a string but it's also a terrible way to store data)

SELECT terrNome             AS Territorio,
  espDescricao              AS Especialidade,
  COUNT (DISTINCT contNome) AS 'Nº Médicos'
FROM tContacto,
  tContactoTerritorio,
  tTerritorio,
  tEspecialidade
WHERE tContacto.contID   =tContactoTerritorio.contID
AND tContacto.tpcontID   =120
AND ','+tContactoTerritorio.territorios+',' like '%,'+tTerritorio.terrNome+',%'
AND (tEspecialidade.espID=tContacto.esp1ID
OR tEspecialidade.espID  =tContacto.esp2ID
OR tEspecialidade.espID  =tContacto.esp3ID
OR tEspecialidade.espID  =tContacto.esp4ID
OR tEspecialidade.espID  =tContacto.esp5ID)
GROUP BY terrnome,
  espdescricao