Dynamic use or not use exit node

Is there a way to set some rule to use exit node? Such as when access some ip will use exit node and other ip will not