Different notification template for distinct groups

I want to use one notification template for the distinct type groups and another for non-distinct groups
how I can achieve that?

User submitted case to support.