Delete line if pattern not found

I thought that this was going to be quit simple using sed but i wasn't able to find a way to delete the second line of a text file if my pattern was not found in the line
With awk i am completly useless :rolleyes:

Any ideas?

kindly give the input and the desired output

---------- Post updated at 06:11 AM ---------- Previous update was at 05:27 AM ----------

use below , and write the code as you can see it in below (same syntax) :-

sed  ' 2 {
/Pattern/ !d

}
'  input.txt

BR

Thanks ahmad.diab!!!

Your command worked fine

sed '2{/pattern/!d}'

(!) is telling sed what not to look for... is that correct?

Thanks again