assuming you call the script like this
$ ./script param1 param2 param3
in the script
echo $0 #will echo 'script' (the name of the script)
echo $1 #will echo 'param1'
echo $2 #will echo 'param2'
echo $3 #will echo 'param3'
echo $# #will echo '3' the number of params passed to script
echo $@ #will echo 'param1 param2 param3' (all the parameters passed)
host="127.0.0.1"
user="root"
password="pass"
result=`mysql -h $host --user=$user --password=$password --skip-column-names -e "select $param1 from $param2 where $param3 = 3"`
echo $result