User object in Drupal has a roles array and all you have to do is to check if this array has the role you want.
Here is an example:
<?php
global $user;
$user->roles[ "ROLE_ID" ] = "ROLE_NAME";
// You can traverse through the array
// and check if user has the role you want
foreach($user->roles as $rid => $role){
if($role == "role_i_want"){
// Do something
}
}
?>