how to pass parameter to where clause dyanamically in store procedure :  

    ALTER PROCEDURE [dbo].[GetCustomers_PagerSelected]
      @PageIndex INT 
      ,@PageSize INT = 10
      ,@SubCondition nvarchar(max)
      ,@RecordCount INT OUTPUT
AS	
BEGIN
      SET NOCOUNT ON;
      SELECT ROW_NUMBER() OVER
      (
            ORDER BY [Plan_Id] ASC
      )AS RowNumber
      ,[Plan_Id]
      ,[User_Id]
      ,[Plan_Name]
      ,[ImageCount]
      ,[PlanPrice]
	  ,'../User/HomePlanImage/' + CONVERT(varchar(5), User_Id ) +'/' + CONVERT(varchar(5), Plan_Id ) + '/' + CONVERT(varchar(5),1) +'.jpg' AS PlanImagePath
      INTO #Results
      FROM [mf_BuildingPlanDetails]
	  WHERE IsActive=1 @SubCondition 
      SELECT @RecordCount = COUNT(*)
      FROM #Results
      SELECT * FROM #Results
      WHERE RowNumber BETWEEN(@PageIndex -1) * @PageSize + 1 AND(((@PageIndex -1) * @PageSize + 1) + @PageSize) - 1 
      DROP TABLE #Results
