Well if someone called me something like maybe a snob, then I would respond by saying, "It takes one to know one." It just means that if this person calls me a snob, then he/she is a snob, too. Otherwise, how would he/she know if I am really a snob unless they know what it's like being a snob.