title: Check if similar value exists in database
body: <p>I want to check if an equal or a similar value exists in database.
  I have build this code:</p>
  
  <pre><code>SqlConnection con1 = new SqlConnection();
  con1.ConnectionString = ConfigurationManager.ConnectionStrings["ChipstarALConn"].ToString();
  
  string sql1 = "select Count(*) from SMS_KOD where KOD = @name";
  SqlCommand cmd1 = new SqlCommand(sql1, con1);
  cmd1.Parameters.AddWithValue("@name", TextBox1.Text);
  con1.Open();
  
  int result = (int)cmd1.ExecuteScalar();
  if (result &gt; 0)
  {
      Lab0.Text = "true";
  }
  else
  {
      Lab0.Text = "false";
  }
  </code></pre>
  
  <p>And it returns <code>true</code>. Now I want to return <code>true</code> if a <code>string</code> entered on <code>TextBox</code> is entered wrong but similar.
  For example if a value in Database is <code>ASDFG</code> and I put on <code>TextBox</code> <code>ASDFH</code> or <code>AXDFG</code> it must also return <code>true</code>.</p>