If you are asking about the original sendmail, and not a clone like Postfix, then you can handle routings using a "mailertable". It ignores MX lookups and sends messages directly to specified servers based on host or domain names.
For instance, let's suppose you process mail for two subdomains in example.com, hr.example.com and mktg.example.com, both of which have local mail servers at 10.10.10.10 and 10.10.10.11 respectively. Then in /etc/mail/mailertable you would have:
(When using bare IP addresses for relaying they need to be enclosed in squared brackets.)
Mail addressed simply to "example.com" or to any other subdomain of example.com would still be handled locally.