Separation of structurally-related compounds with ionic liquids