Well, you have simply a shell scripting problem.
[ = ] compares two its arguments in the shell sense. Now let us see what gets passed in your examples.
Code:
[ setxkbmap -print | grep xkb_s | awk '{print $4}' = $US ]
the first argument is "setxkbmap", the second is "-print" (and not "=") etc. It gets interpreted absolutely not like you want.
Code:
[ "setxkbmap -print | grep xkb_s | awk '{print $4}'" = "$US" ]
Now that is better. But look: you compare string "setxkbmap -print | grep xkb_s | awk '{print $4}'" with "$4" expanded (probably to empty string) with the value of "US" environment variable (most likely empty). Equality is very unlikely.
What is a way that can work? You want to get the value of command execution. There is "$()" construct for that.
Code:
echo "$(setxkbmap -print | grep xkb_s | awk '{print $4}')"
This command will show you the value that this command prints now. This is the value you can put in double-quotes in the right side.
Code:
[ "setxkbmap -print | grep xkb_s | awk '{print $4}'" = "pc+us" ]
Or something like that is what you need.