How do I automatically change the status of Opportunity to "won" if the contact linked to the opportunity has duplicate records in contact list having same name and mobile number?

How do I automatically change the status of Opportunity to "won" if the contact linked to the opportunity has duplicate records in contact list having same name and mobile number?