Is there a way to change a CTA's link based on device (mobile vs. Desktop)

Hey team,

Does anyone know if we can change where a CTA links to on click depending on what device the user is on? A client of mine would like to link to a website page if on Desktop, and a phone number if on mobile.

Thanks!