When your website means business.

ACF, PHP | Type: PHPConditional Based on Field Value

Conditional based on values for single-value fields (radio buttons, select, etc)

For regular WordPress post meta:
<?php 
   $customfield = get_post_meta($post->ID, 'custom_field', true);
   if ( $customfield == 'textstring' ) {
      do stuff
   } 
?>

For ACF:
<?php
   $customfield = get_field('custom_field');
   if ( $customfield == 'textstring' ) {
      do stuff
   } 
?>

for ACF repeater subfield:
<?php
   $customfield = get_sub_field('custom_field');
   if ( $customfield == 'textstring' ) {
      do stuff
   } 
?>