Question : like statement

I'm using like statement in my stored procedure and  getting problem as "incorrect syntax near =" .Code that i try is as below. How can i use like statement to search data  
Is it possible to use select cases inside like statement.If not tell alternatives.
Please refere the code below
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
like (select case @search3 
                              when (@Publication='Customer') then @SearchOn1 
                              when (@Customer='Customer')then @SearchOn2 
                              when (@Publication='Publication' 
                                         and     @Customer='Publication')then '%' 
                              END)
 
or can i use 
 
like(IF Publication='Customer' RETURN @SearchOn1 
      ELSE IF Customer='Customer' RETURN @SearchOn2  
      ELSE IF RETURN '%')

Answer : like statement

so then try this

(SELECT [customerName]
from dbo.customer_Master
where impCode=CC.customerCode
  and [customerName] like (SELECT CASE WHEN @Publication='Customer' THEN @SearchOn1 WHEN @Customer='Customer' THEN @SearchOn2  ELSE '%' END) )
Random Solutions  
 
programming4us programming4us