Looks like you knew the title of your post is the answer: use a variable:

Code:
on *:text:!giveaway:#:{
  if ($nick isop #) {
   var %randnick $nick(#,$rand(1,$nick(#,0)))
   msg # $upper(%randnick) ( $+ $readini(points.ini,n,$+(#,%randnick),points) $+ ) Just won the giveaway, we'll send you a message with details on how to obtain.
  }
  else { 
msg # Dear $nick , You do not have permission to use this command!
 }
}


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net