Try this:
CREATE PROC ListStudents
@Name varchar(20)=''
AS
BEGIN
SELECT * FROM StudentDet WHERE Name LIKE ''+@Name+'%'
END
When you need the details of particular student you can pass the name. If you'll not pass name then it'll list the details of all students.
EXEC ListStudents 'Amit'
EXEC ListStudents
--Amit