title: Can we have multiple case then statements in sql
body: <p>I am trying for something which requires case within case I just wanted to make sure if we can  use multiple case then?I am running this on sql teradata
  The code I am trying to use is as below</p>
  
  <pre><code>AND(
      case when CHARACTER_LENGTH(drug.n)=0 then 0 
  
       when CHARACTER_LENGTH(drug.n)=1 then
       (case when substring(drug.n from  1,1) in            (''0'',''1'',''2'',''3'',''4'',''5'',''6'',''7'',''8'',''9'') then 1 else 0 end)
  
  
       when CHARACTER_LENGTH(drug.n)=2 then 
       (case when substring(drug.n from  1,1) in (''0'',''1'',''2'',''3'',''4'',''5'',''6'',''7'',''8'',''9'') then 1 else 0 end *
       case when substring(drug.n from  2,1) in (''0'',''1'',''2'',''3'',''4'',''5'',''6'',''7'',''8'',''9'') then 1 else 0 end ) 
  
  
       when CHARACTER_LENGTH(drug.n)=3 then 
       (case when substring(drug.n from  1,1) in (''0'',''1'',''2'',''3'',''4'',''5'',''6'',''7'',''8'',''9'') then 1 else 0 end *
       case when substring(drug.n from  2,1) in (''0'',''1'',''2'',''3'',''4'',''5'',''6'',''7'',''8'',''9'') then 1 else 0 end *
       case when substring(drug.n from  3,1) in (''0'',''1'',''2'',''3'',''4'',''5'',''6'',''7'',''8'',''9'') then 1 else 0 end )=1
  </code></pre>
  
  <p>If somebody has better idea you can let me know. I cannot use isnumeric function.</p>