Is there a concept of "Pointer" like in C language?

For instance,
{
:local type1 http;
:local type2 webbank;
:local type3 game;
:local type4 p2p;

for i from=1 to=3 do={
:local x;
:set x (“type” . $i)
:put $x
/ip firewall mangle
add action=mark-connection chain=prerouting protocol=tcp dst-port=80 new-connection-mark=$x
}}

In this case,the “new-connection-mark” in the mangle is “type1”,“type2” and “type3”,but I really want is “http” and “webbank”,“game”,I want the value of variable “type*” rather than variable itself. How to do?

It is not possible.

use set of ‘if’ operators

I don’t know since which version, but it is possible now (V6.32.1). Try this out in a script:

:global variable value
:local pointer "variable"
:put [ [ parse ":global $pointer; :return \$$pointer"] ]

The variable has to be global, but the pointer can be local.
You can also assign value to the variable pointed by $pointer, but you have to store it first in a global variable:

:global newvalue 1000
[ parse ":global newvalue; :global $pointer; :set $pointer \$newvalue"]

It is important to avoid putting the value into the parsed (interpreted) string.

… and there is a straightforward method too.
See commands available at /system script environment.

# pointer: a string containing the name of a global variable
:local ptr "x'

# function to read the pointed value 
:global rd do={:return [/system script environment get $1 value]}

# function to set the pointed value (does not create a variable)
:global wr do={ [/system script environment set $1 value=$2]}

# create the variable
:global x 

# set its value
$wr $ptr 10

# read and write out 
:put [$rd $ptr]

if only we had a proper documentation.