Answer:
These are commonly used interchangeably, and the distinction between them is a small one.
"Comparison to" should be used when comparison is made between specific people, things, or other instances.
Example: John is an excellent student in comparison to his shiftless brother Mike.
"Comparison with" should be used when comparison is made to a group or an indefinite (i.e. uncountable) entity.
Example 1: John is an excellent student in comparison with the rest of his class.
Example 2: John has excelled in school in comparison with what I feared.