How to alter single custom field value in views?
function hook_views_pre_render(&amp;$view) {

  switch ($view-&gt;name) {
    case 'YOUR_VIEW_NAME':
      //  override the global custom text field value
      $view-&gt;field['nothing']-&gt;options['alter']['text'] = 'My custom text';
    break;
  }
}


Check the link for more details
How to insert values into Global custom text field of views programmatically?

add nid as field in view and use that field for condition
you can add condition as follows: if ($nid == '124') {  $view-&gt;field['nothing']-&gt;options['alter']['text'] = $nid}

Simple way is to create a new field field_waga which will have field_waga_1 as new name if you check in the view and then you can change the label and override that field with your custom value

if($view-&gt;result[0]-&gt;field_waga[0]['raw']['value'] == '10') {
//here you can create the field to act as custom text field and enter the custom //value
$view-&gt;result[0]-&gt;field_waga_1[0]['#markup'] = 'alter';
}