Search datatable faster
The most obvious problem is when there are large number of strings, string concatenation is inherently slow. Try using a StringBuilder instead, like this:

 DataTable sqlData = GetConfiguration();

       // var q = sqlData.AsEnumerable().Where(data=&gt; data.Field&lt;String&gt;("slideNo")=="5");

        var w = sqlData.AsEnumerable().Where(data =&gt; data.Field&lt;String&gt;("slideNo") == "5")
            .Select(data =&gt; data.Field&lt;String&gt;("QuestionStartText")).Distinct();

        List&lt;String&gt; queryResult = new List&lt;String&gt;();
        StringBuilder sb = new StringBuilder();
        foreach (var item in w.ToArray&lt;string&gt;())
        {
            if (item != null)
            {
                String queryString = item;
                //queryResult.Clear();
                for (int i = 0; i &lt; excelDataTable.Columns.Count; i++)
                {   
                    for (int k = 2; k &lt; excelDataTable.Rows.Count; k++)
                    {
                       sb.Clear();
                       bool check = excelDataTable.Rows[k][0].ToString().StartsWith(queryString);
                       if (check)
                       {
                           for (int j = 0; j &lt; excelDataTable.Columns.Count; j++)
                           {
                               sb.Append(excelDataTable.Rows[k][j].ToString());
                               sb.Append(':');
                           }
                           string row = sb.ToString();
                           if (!queryResult.Contains(row))
                           {
                               queryResult.Add(row);
                           }
                       }
                    }
                }
            }               
        }