* Major indexes all in red

* CVS Health gains after raising 2021 profit view

May 4 (Reuters) - The Nasdaq ended sharply lower on Tuesday as investors dumped megacap growth stocks to seek shelter in more defensive parts of the market, amid concerns on rising interest rate and uncertainty over an upcoming jobs report.

Highly valued technology-related companies including Microsoft Corp, Alphabet Inc, Apple Inc , Amazon.com Inc and Facebook Inc sold off across the board. The Philadelphia Semiconductor Index also dropped.

Comments by Treasury Secretary Janet Yellen on the potential need for interest rate hikes further exacerbated the tech selloff, as investors worry higher rates would weigh on valuations of growth companies.

"It may be that interest rates will have to rise somewhat to make sure that our economy doesn't overheat, even though the additional spending is relatively small relative to the size of the economy," she said in taped comments at a virtual event by The Atlantic.

Seven out of the 11 major S&P 500 sectors fell, with technology, communication services and consumer discretionary falling the most.

"Wall Street won’t find out if the Fed is making a policy mistake until several months down the road and that is making some traders nervous," Edward Moya, senior market analyst at Oanda wrote in a note.

"After Friday’s nonfarm payroll report, investors will see a clear path for the U.S. economy to recover the remaining lost jobs due to COVID and noticeably hear more companies talk about raising prices." Unofficially, the Dow Jones Industrial Average rose 22.11 points, or 0.06%, to 34,135.34, the S&P 500 lost 27.61 points, or 0.66%, to 4,165.05 and the Nasdaq Composite dropped 261.62 points, or 1.88%, to 13,633.50.

"When we have pauses or pullbacks, people tend to move out of growth stocks into more defensive names," said Randy Frederick, vice president of trading and derivatives for Charles Schwab in Austin, Texas.

Fiscal stimulus, rapid vaccinations and the Federal Reserve's accommodative stance have spurred a strong rebound in the U.S. economy and pushed Wall Street to record highs this year. The so-called "pandemic winners," however, have recently started to fall out of favor.

Among other stocks, CVS Health Corp gained after reporting a first-quarter profit above analysts' estimates and raising its 2021 forecast.

Gartner, rose after delivering better-than-expected first-quarter earnings.

Results in this earnings season so far have been largely upbeat. Average profits at S&P 500 companies are expected to have risen 47.7% in the quarter, compared with forecasts of a 24% growth at the start of April, according to IBES data from Refinitiv.

Investors are also awaiting data through the week, including the Labor Department's monthly non-farm payrolls due on Friday. The report is expected to show a rise in job additions in April. (Reporting by Shreyashi Sanyal and Sruthi Shankar in Bengaluru, Krystal Hu in New York; Editing by Saumyadeb Chakrabarty and Marguerita Choy)