If Else Fetch Script wiith fetch depend on variable?

HI Is Possible to do fetch based on global viable say

if global variable = configured then fetch via url config.rsc
if global variable = unconfigured then fetch via url unconfig.rsc?

any one point me right direction or mind share sample scripts

\

Mikrotik "if" statement example

:global provisioned [ /system/script/environment/get provisioned]
:if (provisioned>=yes) do={
:log info "provisioned"
} else={
:log info "ubprovisioned"
}

Suggestions ?