Use this:
<OutputClaim ClaimTypeReferenceId="Flag1" DefaultValue="{OAUTH-KV:Flag1}" AlwaysUseDefaultValue="true" />
where Flag1 is the value in the query string.
Then do:
<OrchestrationStep Order="x" Type="ClaimsExchange">
<Preconditions>
<Precondition Type="ClaimsExist" ExecuteActionsIf="false">
<Value>Flag1</Value>
<Action>SkipThisOrchestrationStep</Action>
</Precondition>
</Preconditions>
<ClaimsExchanges>
<ClaimsExchange Id="Call-API" TechnicalProfileReferenceId="REST API" />
</ClaimsExchanges>
</OrchestrationStep>
and similarly Flag2 would call another API