google is probably not the best example, since it returns multiple ips. It has many servers that can respond.
I used msn because it returned one address.
ping msn.com
:put [/ip dns cache get value-name=address [find name="msn.com"]];
First ping the domain you wish to find.
Then extract the IP from the DNS cache.
Make sure that you use the same exact domain in each command. http://www.msn.com and msn.com are two separate DNS entries. So each command has to match.
there are some ways to do it.
you can use resolve command, something like this
{
local host1 [resolve google.com]
put $host1 }or
{
local host1 [resolve google.com]
log error $host1 }